//
// Created by mazaiting on 2024/4/29.

#include <cstdio>
#include <ctime>

//Time elapsed: 2848.00000
//Time elapsed: 23913.00000
// 程序A
int a[1000][50][8000];

int main() {
    clock_t start = clock();

    for (int i = 0; i < 1000; i++)
        for (int j = 0; j < 50; j++)
            for (int k = 0; k < 8000; k++)
                a[i][j][k] = i + j + k;

    clock_t stop = clock();

    double elapsed = stop - start;
    printf("Time elapsed: %.5f\n", elapsed);

    start = clock();

    for (int k = 0; k < 8000; k++)
        for (int j = 0; j < 50; j++)
            for (int i = 0; i < 1000; i++)
                a[i][j][k] = i + j + k;

    stop = clock();

    elapsed = stop - start;
    printf("Time elapsed: %.5f\n", elapsed);
    return 0;
}